Skip to content

feat: Add Across Perps withdraw support#8841

Draft
pedronfigueiredo wants to merge 1 commit into
mainfrom
pnf/perps-withdraw-across
Draft

feat: Add Across Perps withdraw support#8841
pedronfigueiredo wants to merge 1 commit into
mainfrom
pnf/perps-withdraw-across

Conversation

@pedronfigueiredo
Copy link
Copy Markdown
Contributor

Summary

Adds Across support for HyperLiquid-source Perps withdraw post-quote flows in transaction-pay-controller.

Changes

  • Adds perpsAcrossWithdraw to TransactionType for Across Perps withdraw bridge legs.
  • Detects direct and nested perpsWithdraw transactions.
  • Allows supported HyperLiquid-source Perps withdraw post-quote requests through the Across strategy.
  • Normalizes HyperLiquid-source Across requests to HyperCore USDC-PERPS and shifts USDC amounts from 6 to 8 decimals.
  • Uses Arbitrum USDC as the fiat-rate anchor for HyperCore USDC-PERPS source quotes.
  • Skips prepending the original EVM transaction for HyperLiquid-source post-quote Across withdraw submissions.

Validation

  • yarn workspace @metamask/transaction-pay-controller run jest --no-coverage src/utils/transaction.test.ts src/strategy/across/AcrossStrategy.test.ts src/strategy/across/across-quotes.test.ts src/strategy/across/across-submit.test.ts
  • yarn exec eslint packages/transaction-controller/src/types.ts packages/transaction-pay-controller/src/utils/transaction.ts packages/transaction-pay-controller/src/utils/transaction.test.ts packages/transaction-pay-controller/src/strategy/across/AcrossStrategy.ts packages/transaction-pay-controller/src/strategy/across/AcrossStrategy.test.ts packages/transaction-pay-controller/src/strategy/across/across-quotes.ts packages/transaction-pay-controller/src/strategy/across/across-quotes.test.ts packages/transaction-pay-controller/src/strategy/across/across-submit.ts packages/transaction-pay-controller/src/strategy/across/across-submit.test.ts packages/transaction-pay-controller/src/strategy/across/perps.ts
  • yarn build
  • yarn changelog:validate
  • git diff --check

@pedronfigueiredo pedronfigueiredo force-pushed the pnf/perps-withdraw-across branch 2 times, most recently from aa718cf to dc6ef3f Compare May 18, 2026 13:09
@pedronfigueiredo pedronfigueiredo changed the title [codex] Add Across Perps withdraw support feat: Add Across Perps withdraw support May 18, 2026
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/perps-withdraw-across branch from dc6ef3f to a30e120 Compare May 19, 2026 10:32
@pedronfigueiredo pedronfigueiredo force-pushed the pnf/perps-withdraw-across branch from a30e120 to ddcc878 Compare May 19, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant